#!/bin/bash

sudo yum install nginx -y

if [$? -eq 0] then

echo 'success'

sudo systemctl enable nginx

sudo systemctl start nginx

else 

echo 'fail'

exit 1

fi

echo '脚本执行完毕'
